package com.xinqi.modules.exam.student.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 错题集类型，1-错题集；2-星标题；
 *
 * @author linkai
 * @date 2023/7/16
 */
public enum PaperErrorSetTypeEnum implements BaseEnum {
    错题集("1", "错题集"),
    星标题("2", "星标题"),
    ;

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    PaperErrorSetTypeEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static PaperErrorSetTypeEnum of(String code) {
        return BaseEnum.of(PaperErrorSetTypeEnum.class, code);
    }

}
